%% x axis
f0 = [0.37
0.27
0.92
0.38
0.54
0.36
0.36
0.37
]';

%y axis
f1 = [0.10
-1.25
0.76
0.18
0.61
-0.57
0.22
0.12
]';

poly = polyfit(f0,f1,1);
f = polyval(poly,f0); 


figure;
plot(f0,f1,'*',f0,f,'-')
xlabel('F0 LI');
ylabel('F1 LI');
axis ([0 1 -1.4 1.4])
title ('Fo LI vs F1 LI');
%xlabel('dif size')
%ylabel('F1 LI')

[corr, p, corr_iter] = corr_resampling(f0, f1, 5000);

figure
hist(corr_iter)
title ('Resampling histogram');


[~, low_ci, up_ci, corr_btsp] = corr_bootstrap(f0, f1, 5000, 0.95);

figure
hist(corr_btsp)
title ('Bootstrap histogram');